<template>
  <div>
    <el-row class="row">
      <p class="title">编辑文章</p>
    </el-row>
    <el-row class="row">
      <el-col span="6">
        <el-input placeholder="请输入文章标题">
          <template slot="prepend">
            标题
          </template>
        </el-input>
      </el-col>
    </el-row>
    <el-row class="row">
      <markdown-editor ref="markdownEditor" v-model="content" height="600px" />
    </el-row>
    <el-row>
      <el-button @click="getHtml">获取html</el-button>
    </el-row>
  </div>
</template>

<script>
import MarkdownEditor from '@/components/MarkdownEditor'

export default {
  name: 'index',
  components: {MarkdownEditor},
  data() {
    return {
      content: ''
    }
  },
  methods: {
    getHtml() {
      let html = this.$refs.markdownEditor.getHtml()
      console.log(html)
    }
  }
}
</script>

<style scoped>
.row {
  margin: 10px;
}
.title {
  size: 14px;
}
</style>
